﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TVGuide.DataAccess.Common
{
    public class Category
    {
        #region Public Members

        public short Id { get; set; }
        public String Name { get; set; }
        public String Description { get; set; }
        public short? Priority { get; set; }
        public String Color { get; set; }

        #endregion

        public Category() { }

        #region Explicit Cast

        public static explicit operator category(Category c)
        {
            if (c == null)
                return null;
            category cat = new category();
            cat.catID = c.Id;
            cat.catName = c.Name;
            cat.catDescription = c.Description;
            cat.priority = c.Priority;
            cat.color = c.Color;
            return cat;
        }

        public static explicit operator Category(category c)
        {
            if (c == null)
                return null;
            Category cat = new Category();
            cat.Id = c.catID;
            cat.Name = c.catName;
            cat.Description = c.catDescription;
            cat.Priority = c.priority;
            cat.Color = c.color;
            return cat;
        }

        #endregion
    }
}
